package BookTest;

import java.util.Scanner;

public class C9Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入购买的数量：");
        int i = sc.nextInt();
        C9Commodity a = new C9Commodity(i);
        if(i == 1){
            a.pay(i);
        }else if(i >=2){
            a.pay(i,true);
        }else{
            System.out.println("输入购买商品的数量错误");
        }
    }
}
